package com.ibeeking.found.cop.service.common.dos;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @ClassName  DataTalkFriendsDO
 * @Description 好友列表
 * @Author ibeeking
 * @Date 2021-01-15 10:44
 **/
@Data
@TableName("data_talk_friends")
public class DataTalkFriendsDO implements Serializable {
    private static final long serialVersionUID = -1L;

    @TableId(type = IdType.ASSIGN_ID)
    private Long id;
    /**
     * 消息id
     */
    @TableField(value = "talk_id")
    private Long talkId;

    /**
     * 消息id
     */
    @TableField(value = "msg_seq")
    private Long msgSeq;

    /**
     * 消息id
     */
    @TableField(value = "msg_id")
    private String msgId;
    /**
     * 消息发送方id。同一企业内容为userid，非相同企业为external_userid。消息如果是机器人发出，也为external_userid
     */
    @TableField(value = "sender")
    private String sender;

    /**
     * 消息发送方name
     */
    @TableField(value = "sender_name")
    private String senderName;

    /**
     * 消息发送方nickname
     */
    @TableField(value = "sender_nick_name")
    private String senderNickName;
    /**
     * 消息发送方头像
     */
    @TableField(value = "sender_avatar")
    private String senderAvatar;

    /**
     * 消息接收方id
     */
    @TableField(value = "receiver")
    private String receiver;

    /**
     * 消息接收方name
     */
    @TableField(value = "receiver_name")
    private String receiverName;

    /**
     * 消息接收方nickname
     */
    @TableField(value = "receiver_nick_name")
    private String receiverNickName;

    /**
     * 消息接收方头像
     */
    @TableField(value = "receiver_avatar")
    private String receiverAvatar;

    /**
     * 群聊消息的群id。如果是单聊则为空
     */
    @TableField(value = "room_id")
    private String roomId;
    /**
     * 群聊名称
     */
    @TableField(value = "room_name")
    private String roomName;
    /**
     * 1=内部好友；2=外部好友，3=群聊
     */
    @TableField(value = "type")
    private Integer type;
    /**
     * 消息类型
     */
    @TableField(value = "msg_type")
    private String msgType;
    /**
     * 群消息发送时间戳
     */
    @TableField(value = "msg_time")
    private LocalDateTime msgTime;
    /**
     * 文本消息，前端展现用
     */
    @TableField(value = "text_content")
    private String textContent;
    /**
     * 创建时间
     */
    @TableField("create_time")
    private LocalDateTime createTime;
}
